Fixed a few misprints and minor bugs