fixes. lots of fixes