fix ajax GET and POST requests