forgot to initialize bad_wr to NULL