Fixed negative grid sizes.