fix type check when localmode