Fixed a bug and some spelling.