Fix: sql error
Merge pull request #710 from FHenry/3.3

Fix [ bug #742 ]