created ws fixed, simplified the ajax complete callbacks