fix bug introduced in webdav by new write changes