Fix typecheck