Fixed some minor typos and minor bugs