Merge pull request #12 from Bishop/master

Fixed polymorphic references