Fix baseclass bugs