Adding Changes from Pull request #158