fixes #1366