Fixed serialization for special keys