Fixed problems uncovered by workings.