changing part of #637 to fix broken tests and get build green