minor fixes of convert long to int