Fix issue when converting string to uppercase