fixing jquery publish issue