fixing upload bug