Fixing reversed condition