fix upload and delete bug