Ajax method fix