New code not running despite flawless flash

My problem is that the program upload is reported to have run successfully. I see the leds connected to the Rx and Tx flash really fast as they always do when I upload a new program. Then after the Atmel chip resets itself and boots up, it starts running the previous program.

Thanks for your help.

Dom