Fixed crash in setActiveManager