Cannot read property 'language' of undefined