Fixing bug that can cause infinite loop
Update changelog