Fix a bunch of warnings