Update code to avoid Stale Exception.