fix static analysis problems