wrap init and shutdown, fixed shutdown