Fixed runtime error

My bad. My code broke your script. This should fix it.