The database module is modified to fix some small bugs.