The reason why my example tests for button release first is because I was running the program with the RUN command in direct mode (pressing "A" to enter the command) and the "A" button was still pressed when the program started (because SmileBASIC is so fast).