Added shutdown mechanism. Fixed a bug where abort from TTL would not unlock.