Only set up expiration channel if necessary

Fix #933