fix build fail, fix windows 64bit issue, remove warnings