Updated logic on max bid calculation to include only active bids