variable name fix in segments.py