Bugfix inside class.database.php