Fix use of $this inside filter callback