fix ajax request problems