a few crash fixes.
Merge branch 'master' of https://github.com/lansdon/cpts422