add tests and fixes for from-task, stop-after and stop-before