fixed bad loop in WaitButton