Fixed a grid bug introduced in the latest commit