Return to correct viewcontroller when cancelling or uploading image.