Fixing a bug involving nil.to_i == 0.