prevents 'Cannot read property components of undefined' error