fix tests for SQL