backport of #1066 to stabe45
Merge pull request #1183 from owncloud/fix-388-stable45

backport of #1066 to stabe45