added missing db_close()