Small improvements

@tt, @gudmundur, you might find this of some interest given the bug report you made around an htcat hang you reported.