fix most of the warnings