5th batch of bugs fixed