protect rendering against NaN bugs (partially)