fix static analysis issues