Fixed script stopping when it shouldn't.