Fixed bug with wrong variable name

Changed this->type to this->_type in class