fixed some silly bugs