Fixed dictionary join function.