Fixed #2220

See #2220 for reference.