Fixes category widget SQL error