Fix a lot of warnings