Fix joins handling for file types