Fixing compile errors after changes to Task's public API