CHAT-1 Fix some sonar bugs