Moving the unpublish_* actions to the right place.

More info:  issue #277