fix the database access and insertion issue