Changes for new api

Created the fixes for owncloud only (sorry I do not use the other stuff)