It looks like the current->categoryID is not properly initialized and it does not contain the proper data.