fix bug allowing waitingdiv to remain showing when it shouldn't