fix incorrect call to splitlines; ensure all fields are copied in a clone