Bunch of small bugs fixed.