Fixed #1197

Fixes #1197