Fix task registring