renamed $this->Mode to $this->Type

caused errors since $this->Mode was not defined