Multiple refs bug

Addresses #1