Fix ajax request bug