lots of fixes. seems to be working again now.