AMENDMENT NO. 4 TO STOCK PURCHASE AGREEMENT