fixed callback methods for ajax