fix speak termination
add error handling function