Fixes resizing issues with grid