various minor bugfixes to cable_len.py