Fix #1017