Add better support for fetching tasks