Probably-working Java hang fix