Fix #1022