minor fixes when doing integer cast