removed reference to $this within closure for 5.3 compat