Lp 1749593: Fix TypeError: Cannot set property 'grid' of undefined