Fixing a client script crash

Finally figured out what was causing a bunch of crashes with people using scripts :x This fixes the problem and I've put a workaround in my current scripts so it doesn't crash anyone else :v