fix https://github.com/owncloud/core/issues/6825