Fix incorrect reassignment of $this