Fixed a couple exceptions