bug fixed for mssql dialect