Fixed a bug where the formatting of the SQL causes improper registration.