replace 'keep_if' with 'reject'

to fix immutable node attribute issue.