This line looks wrong to me. I think you intended to check for ```keyOrder``` with ```hasattr``` right?