fixed resubmitbutton and error handling for stock