fix ajax request and controller response.