fixing getNextLineID()