bug fix in getSegmentInfo in views.py