Fixing https://github.com/owncloud/core/issues/6328