fixed localhost ajax bug