ipairs only iterates on integer keys: use pairs instead.