I had this problem. All you need to do is download the handheld software from
www.tmobile.com/bbupgrade
After you download it then you install the exe file.
After that just go into application loader in the desktop software and reinstall the handheld software. Then it is completely fixed, but all your data will be gone unless you backed up before the error.
Hope this helps.
Hays