What matter is that the enemy could be able to get into certain state based on condition or input it encounters. Make sure all condition met when the enemy should back to initial state or in-between state.
Do not hesitate to share portion of your project here for direct elaboration.