fixing minor bugs.