Improves handling with encoding