fixed minor bugs.