changed success to complete for some ajax calls