Ive used these forums a lot as a lurker to obtain information so its only fair that I share this information that might be useful to many. I have a 3GS on 3.1.3 new bootrom that got hung when I tried to erase all content and settings. I couldnt get past the apple logo so decided to update through iTunes and wait for the jailbreak/unlock by the dev team. When I clicked restore on iTunes it went to the software update server and gave me the option to download 3.1.3 instead of 4.0. Not sure why this happened since I thought apple stopped signing and distributing 3.1.3 but im downloading it now and everything appears to be going ok. Just checked the file it has created and it is definitely the 3.1.3 firmware its downloading. If anybody is in a similar situation, updating through itunes might be worth trying out right now..