SECOND AMENDMENT TO STOCK PURCHASE AGREEMENT