Fixes for SQL 3.1.4
Merge pull request #115 from Itsyuka/patch-7

Fixes for SQL 3.1.4