Fix typing.

Change string to int to prevent badarith errors.