Try adding this at the beginning of setup(): wdt_reset ();
If you are using a bootloader, use optiboot.