Fix to deal with tar directory