correcting a bug in the InterProlog term writer