Fixed type error in `do_set` method.