Use TaskInternal instead of casting BasicTask
Merge pull request #905 from aledsage/fix/use-TaskInternal-instead-of-casting-BasicTask

Use TaskInternal instead of casting to BasicTask