Fix some long to int conversion warnings.