fixed meshgrid matrix ordering