Workaround for pickling.