fix for upload, finally killed this bug