Scripts errors fix