fixed mssql bug