Sort keys to pass tests