fix a lot of warnings