Fix class scope inheritance