fixes some of the horrible mistakes I just made