Fix all kinds of warnings