fix bug in publish with prompts being out of scope