corrected typo handling in keys