Get retrieve_conf failed, config not applied when trying to Update settings

Hello, I updated my freepbx to FreePBX 2.5.1.5 and now when I try to apply new settings I get this:

Reload failed because retrieve_conf encountered an error: 1

exit: 1

Checking for PEAR DB…OK
Checking for PEAR Console::Getopt…OK
Checking for /etc/amportal.conf …OK
Bootstrapping /etc/amportal.conf …OK
Parsing /etc/amportal.conf …OK
Parsing /etc/asterisk/asterisk.conf …OK
Connecting to database…OK
Connecting to Asterisk manager interface…OK
[FATAL] SELECT grpnum, strategy, grptime, grppre, grplist, annmsg, postdest, description, alertinfo, needsconf, remotealert, toolate, ringing FROM ringgroups WHERE grpnum = [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘’ at line 1]SQL -
SELECT grpnum, strategy, grptime, grppre, grplist, annmsg, postdest, description, alertinfo, needsconf, remotealert, toolate, ringing FROM ringgroups WHERE grpnum =

1 error(s) occured, you should view the notification log on the dashboard or main screen to check for more details.

Can someone please help me get my freepbx back working right?

It looks like your ringgroup module was not upgraded. Go to Module Admin and do a Check for updates online and upgrade Ringgroups (and possible all other outdated modules) then try again