removed some minor bugs