A few more fixes from BS12 dev branch.