Use TaskInternal instead of casting to BasicTask