Fixes test task to exit properly.