Added line to force a lock release on a thread if quitting.  This fixes the bug where it won't ever quit if the app is in a pause state when attempting to quit.