Backported EOF handling fix from master
Update changelog