Fixed error in databasecontroller.