fix grid generation
yay