Thanks for your help.
I first restored to stock firmware using odin. Then I installed Galaxy Toolbox and backed up the IMEI and then I flashed a rom from the link you gave me and now everything is working fine.
The rom is also superb.
XDA Developers was founded by developers, for developers. It is now a valuable resource for people who want to make the most of their mobile devices, from customizing the look and feel to adding new functionality. Are you a developer?