more minor bugs fixed