Praj/fixing win 2003 errors

Tested on the Windows 2003 and Windows 2008R2 boxes.