Prerelease bug fixing

Fixed a handful of errors in the new version found by yed and AI.