Fixed an error in the database controller.