fix issue with exception when coloring lines