Fix copy permission bug