Fixing if syntax