Implemented timeout for restoring original state.