Changed close to also call shutdown