changed onsubmit_callback handling