Fixed SQL parser bug (issue 1369)