Make sure rd is initialized. Fixes #1646
Merge pull request #1666 from cmouse/fix-issue-1646

Make sure rd is initialized. Fixes #1646