fixes for same line addition logic