Fix a bug in the type inferencer