Fixes the duplicate reference issue. Closes #32