Fix #599
Merge pull request #731 from gadelat/issue-599

Fix #599