few more minor bugs fixed