Change the key parsing for more flexibility.