somr minor bugs fixed