Fix exit procedures in nested states
Use gcc instead of clang