fixed stuff to make it work in iis 7