fix some silly bugs