Fix crash on EOL change