Issue 1221

fixes #1221