Fixes for upload