corrections to the way the ajax is deferred