fixed bugs with resource uploading / retrieval