Fixed upload bug