RR: fix here document in finalise.