Adapted to API changes in Handler class and make_handler