Cannot read property 'key_as_string' of undefined