fixes for 1912d685f8891ae7615a9c1bec7125a6377e2681