small code fixes from migration from old repo