debugging code for weird db error