Reslove the type conversion error for Ubuntu and CentOS