Fixes for sim for CLANG