fixed bugs in waitLoading again