fix critical bags hook and set_where