fix multiple logging issue
merge with Brian's patch