Fix adding the same line more than once