Fix #1166