fix typecheck