Fixed another case where the codepage could be set to -1