Added to_i cast fixing String to number comparison error