Fixed static analyser warnings.