Fix grid-seq for arbitrary directions