Fixed a referencing issue with task callbacks.