fix static analysis errors