Xuzhen and Cybermuz fixes to remove warnings and fix build on 3.10.x