Fix #1504

See #1504