Fixing not removing temp line properly