script crash fixed