fix bugs and log
merge