fixed a typo in resolve_type