silence warning about $type being undeclared