fixes #1026