just a bunch of fixes