Fixing problem with encoding