cursor->next may be NULL
Make error message a bit more cleart