Fix #1005