Some potential fixes for clang, not complete