fix incorrect type check