If you absolutely must transit MIA, plan at least two hours for immigration (which can have a completely full hall with weird queues,) and customs, which can be as bad. You may well get out earlier, but you may not, and with security to process again, a landside AC, incredible chaos, bag thefts and tampering, it's really worth planning to avoid this miserable excuse for a world airport. I can't even imagine what people think when entering the Unites States the first time through this portal of penance.