Correction to sqlserver 2012 scripts