Properly handle interruption