Added fix for PR #852