corrected bug in logging duplicates fix #3