Implemented a watchdog for issue #534.