fix bug with onepixel grids