fixed a error with friend classes