Fix #522

See #522