Fixed ajax callback method