- added compatibility fixes for SQL Server