Modify Min function in AI component