Fix class hierarchy after merge