minor optimisation while hunting down internal error bug