fixes a whole host of small issues