fixing minor bugs