Fixes for bugs with segment placing