Added assertion to TAsk