UPDATE: OK, I fixed it. I had to modify two different files, adding some code to verify if the value is serialized, and in case it is, unserialize it and use the integer numeric value for the category. I had to read many many things, and learn about features that were new to me, but now it is all working fine, so I am marking this as solved.