Fix logic
Merge pull request #10 from marcingy/pub-207

Fix logic