fixing term_handler for client