fix use of $this in a static method