fix some static code analysis complaints.