This fixes taking in account the published state
Merge pull request #10 from beat/patch-2

This fixes taking in account the published state