bug in type checker