fix weird logical behaviour
Merge pull request #4592 from owncloud/fix-logic

fix weird logical behaviour