Properly parse keys