lots of fixes. worst commit message ever