Merge pull request #625 from hcavarsan/issue-591