fixed some dumb bugs