fixed minor bugs3