registerFilter method prototype has been changed.