fix upload bug