avoid access on undef ref