text encoding bugfix