Set dbref=True to avoid deprecation warning. Closes #650