fix code to avoid dump