fixed class inheritance bug