This fixes taking in account the published state

This fixes taking in account the published state