Fix possible undefined key