fixed a bug of ignoring custom script names
fixed a bug during export