Bugfix to if statements and cps conversion.