some illegal SQL fixes when linking categories and features