fix a error in some environments.