Fix typo in join type and add missing test