Fix compilation
Change variable setting with proper enum name, update publish with logically correct value.