lots of other fixes