bug fix and add log
test