fixes https://github.com/owncloud/core/issues/1175