Fix some mistakes

Fixed a few obvious errors I found when reading the script.