remove directPublish var from wrong spot