Fixed test hanging.