Unexpected acceleration

I have a 2001 Volvo s40 which accelerated unexpectedly on occasion. Typically it happens when I’m at a stop light or in stop and go traffic, although the acceleration happened when I had the cruise control on going 65 mph. This doesn’t happen when the A/C is on. Any help?