Fix typechecking logic