Fix analyser warnings