small fixes and cleanups
Merge pull request #641 from owncloud/fixes

small fixes and cleanups