pdb_on_err fix