fix 'unhashable type' bug in logging