Fixing issue with endofline char