Remove Task cursors from tests
Fix toArray calls