Typehint with specialization bug fix