change some long type to int32_t or int