fixes #874