Tweaked code in ship.lua