bugfixes for uploading resources