Improve CHANGELOG and move assignment to outside the `if` statement.