Fixed #789

Fixes #789.