fixed struct/class mismatch
fix windows build errors