fixing minor bugs and typos