hardening to avoid errors