Fix #1001