misc fixes (including #715, #713)