Changed variables dealing with encoding