Fix SQL syntax.
Merge branch 'master' into kronolith_4_2