Fix a bug where the ntp wouldn't close