Make tests more stable, fixed typos.