Fixed WIN32 related issues