Merge pull request #355 and #358