Added correct handling of unicode strings