Fixed the as[Type] conversion for own type