many fixes (see googledoc)