add hitch in do_task; fix bug when crashing due to non-int input