fix for SQL Server 2012