I think these set_exception calls need to be here