fixed issue with unicode error in matplotlib agg