Fixes #4 - Task should exit correctly when done