bug fix on ajax request