Fixed a couple small bugs