Fixed some inconsistent int type usage