Always get caught out using $w instead of $this->w