Fix loose typing check