Fix a bug when applying partially
Remove an unused parameter