modify some bug in database model