Fix wrong definition of types_match