fixed #96
(cherry picked from commit 19f0621)
(cherry picked from commit 8e1eb5b)
reFixed #94
(cherry picked from commit 30ae4c9)
(cherry picked from commit 3b86100)
fixed #99
(cherry picked from commit b91c963)
(cherry picked from commit 93d63a5)
fix #97
(cherry picked from commit 4d449e7)
(cherry picked from commit ce1f00d)
update #94, #96, #97, #99