Corrected bug with the default "No Category"

The SQL optimisation patch had introduced a bug with "No Category", now
solved
Merge pull request #22 from Alkarex/SqlOptimisation

Corrected bug with the default "No Category"