Modified set_backend() a bit.