Fix 1458

Fixing notices reported in https://github.com/owncloud/apps/issues/1458