Use dowhile instead of while, to accomodate for that one off time.