fix typo in segment creation