Change functions due to changed definition of upload()