fixed removeUnit() circular buffer