Fix #1786

See #1786