Solve issues with the order of the keys