Grid size 0x0 issue fix