Fix using $this in static method