resolved some minor bugs