fix word and category retrieve from db - part 2