Revert "Removed $this in static function, bugfix"

This reverts commit c1297a693901131ae99bad7570f45ced085d8faa.