small edits to some int casting.