fixed the bug that doesn't use 'private:' but 'protected:'.