fixing bugs in the Submit operation