Fixed some really dumb bugs