bug fix in submit callback