Bugs beta1 fixes

work in progress; not finished yet.