General bug work, there's a small bug in here I can't find...grrr