minor bugs and changes