Configurable join
Fix small bugs