Clean up stack code for new join
Make test work