Fixed test which was sometimes failing