Read Sg2 headers
Fix crash with clang