If you're intimating that the pump runs on, this would be quite normal, the boiler keeps the pump running to cool itself down.
However, if the flame remains alight for 30 seconds, either the diverter valve and/or microswitch is sticking, or you have a 'dead leg' in the hot water pipework.
If you've had no work done on hot water pipework recently, try opening every hot tap in turn allowing it to run for 30 seconds or so to see if this fills the dead leg.
Carefree
July 2010