fix params parsing in segment creation