Use `Integer(act.percentage)` instead of to_i to catch more errors during conversion.