fixed a ajax bug