Better grid initialization mechanism.
Workaround for problem with initial grid size inside the hidden container.