Fixed test bugs.