fixed some icky bugs