Logic Shortcut

Added a short circuit in an if statement to keep from redundant checking
in my while loop.