Merge pull request #762 from grandoc/develop

fix sql error