various bug fix
sync