SECOND AMENDMENT TO royalty agreement