Fixed db_flush()