Another batch of bugs fixed.