Prep encode for threading.