fixes #981