Bug fixes, round 2.