Issue#78
(cherry picked from commit b70257e)
Issue#80
(cherry picked from commit 5d6eb68)