Sec. 31.

That section 4530 of the Revised Statutes of the United States is amended to read as follows:

"Sec. 4530. Every seaman on a vessel of the United States shall be entitled to receive on demand from the master of the vessel to which he belongs one-half part of the balance of his wages earned and remaining unpaid at the time when such demand is made at every port where such vessel, after the voyage has been commenced, shall load or deliver cargo before the voyage is ended, and all stipulations in the contract to the contrary shall be void: Provided, Such a demand shall not be made before the expiration of, nor oftener than once in, five days nor more than once in the same harbor on the same entry. Any failure on the part of the master to comply with this demand shall release the seaman from his contract and he shall be entitled to full payment of wages earned. And when the voyage is ended every such seaman shall be entitled to the remainder of the wages which shall be then due him, as provided in section 4529 of the Revised Statutes: Provided further, That notwithstanding any release signed by any seaman under section 4552 of the Revised Statutes any court having jurisdiction may upon good cause shown set aside such release and take such action as justice shall require: And provided further, That this section shall apply to seamen on foreign vessels while in harbors of the United States, and the courts of the United States shall be open to such seamen for its enforcement."