Stocks gain as vaccine shields second wave worries