Fixed friend class bug.