Added static variable to track services state.