resolve script bug