Fix bug where report permalinks were incorrectly constructed.