0.2a fixed while loop and exit code