Fixing if expressions