fix db commit bug