Fixed to be compatible with new class structure