Fix some hangs.