fix most warnings