Fixing syntax in conditional