segment bugfix