Fixes TypeError: Cannot read property 'range' of undefined