Fixed bug in SqlEngine