presumably a fix;

nil.to_i doesn't take arguments, but string.to_i does