fixed the type checker