correcting an encoding issue with env dicts