Second segment bug fix (all fixed now)