Fix for encoding not saving