Fixed a couple silly bugs