[FIX] Too complex function manage_advanced