Fix compatibility with MSSQL