Changed encoding from Encoding to string, since Encoding doesn't work :\