Added lockouts for when the scrpt has just started and the state hasn't been fully populated yet.