fixed a bunch of warnings.