Fix factory variables in pickle steps