fix type judgement error