fix off-by-one error in fetching records (first record was lost)
fix bug when requesting all nodes ("SITENAME" was used instead of "NAME", which left all nodes as undef because of no match). Remove obsolete debugging printouts