Fixes some static analysis issues.