Fixed the type checker