Fix #1350

The bug was introduced in cc8bc086381dc0b8d2b8a2751f29c0667545da33

See #1350