Fix double encoding