Fix calling $this in static method