lots of fixes'