Remove last has_key statement