Return state restored to OK after function call