PRE: fixing if-statement ambiguity