Fix publish filtering

Clearing and pagination, fixes #2091