Minor bug fixes
XRAY Change to SQL Server