Assertion for clang scan
Fixes for clang scan