various fixes for latest m2.
16 files changed