fix for bug #949 CRITICAL: Grid is broken: TypeError: Cannot call method 'replace' of undefined