Fix grid ordering