Fix issue 1290

Fixes #1290