bugfix on submit