Improve encoding stability