Attempt at encoding fix