fix a bunch of warnings