Fix frontend bug in submit handler.