fix problems with mssql constraints