Bugfix/segment issues