fix $type define