Fixed some silly bugs