This fixes the code so it is correct on both sides of the if().