many fixes all over the place