fix various struct's bugs