Fix upload bug