Upload problem after installing bootloader

I just replaced the Mega328 on my malfunctioning Aurduino Pro board (3.3V 8MHz). I burned the bootloader with AVRStudio and the AVRISP Mk2 following the steps here: Arduino Playground - Burn168. After this i get a strange behavior that make me think i did somethin wrong. After burning the bootloader i can upload ONE sketch from the Arduino IDE. When i try to upload another one i get the same communication error that other people have seen.

As soon as i burn the bootloader again i can uploas a new sketch ONCE. I guess that the bootloader destroys itself when uploading the sketch. Have i missed setting anything when burnign the boot loader?

/Magnus

There are lockbits that need to be set to protect the loader after burning it. If you use the ide to burn the bootloader I believe it does it automatically, if you are doing it yourself with AVR Studio I believe you set them to 0xCF.

Thank you. That was the problem. /Magnus