changed so that the upload button wasn't destroyed