word segment bug fix