fixed example
make example shutdown properly