Slight changes to checking extensions