Trying to work around program hangs.