Fix crash when query consumption record