Fix inheritance

see pr #2615