Fix #1006