Hello, I hate to say it, but it sounds like an internal mechanical concern with the transmission, perhaps hydraulic pressure related. Hands on testing is needed.
www.repairpal.com/repair-shops
RepairPal Certified shops can diagnose and repair your 2004 Kia Rio. They provide transparent pricing with a minimum 12-month or 12,000-mile warranty on repairs and services.