Add wait for ajax loading gif to disappear.