Fix int type inference in range calls