join outer bug fixed and test implemented