Fix #1004