Fix for joins code block