Add windows compatability code