fix bug and test join