Remove some warnings
Replace `static` with `const`
Fix build