fixed joinList for edge cases