fix most of compilation warnings