sgather regression tests bug fixes

Fix some bugs found in running on various configurations