Fix UnboundLocalError for conversation.