typeof match fix