fixing a bug where `if` did not evaluate its first argument