mssql compatibility (fix #396)