Fixing the backwards 'if'