fix for https://github.com/owncloud/documents/issues/165

fix for https://github.com/owncloud/documents/issues/165