Fix some silly bugs