Additional fixes for violations found by code analyzis