fixing some silly bugs