Fixed if/then clause