fix: $this cannot be used in closures post 5.4