Ship grounded on Spanish coast stops leaking fuel