fixes #2 (where clicking cancel still uploads the image)