Amended while condition