fix encoding propagation