lots of fixes that i never checked in