Fix wrong conversion to_i