bugfix for sql server 2008