fixed bugg on context for publish