Fixed #830.
Merge pull request #832 from qreal/#830

Fixed #830.