Updates script.js to proper handle spotId property