Fixed a logic bug involving single line if/while statements