bit of shutdown stuff