Changes to fix preview functionality of joins.