fix script handler