Exiting from submit function.