fixing a bug with too many lines