fixed shutdown exception (well this is starting to become annoying)