Merge branch 'pr/401'

Merging a rebased branch for pull #401