Fix problems left in from the merge of reports branch.