clean up

some error handling cleanup