fixes #1019