little SQL bugfix

resolves #163