Fixed wrong key order when hydrating documents.