Fixed scripts problems