This always fails as undefined and I can't find the correct definition