fix handler flet and remove some debugging code