Added called function for the first activation of a state.
Merge branch 'dev' into feat/script