fixed a bug with non-standard characters