Fix a bug for different system environment.