Fixed use of $self instead of $this.