fix typeof issue.