backport of #4357 to master
Merge pull request #4601 from owncloud/fixing-4341-master

backport of #4357 to master