Fix #586