Fix bug #1683

See #1683