fixed minor bugs