Fixes instantiating join records. #211.
Merge pull request #210 from codeodor/master

Fix several issues with the tests