Trying to fix a bug in the type checker