win7 compatibility fixes