Gh158&gh164

Issue #158, #164