Fix for join problems