Fix issue 831