fixed the complex key serialization issue