Fix a few potential bugs on non-english systems.