Fix issue with minimizing script and validation function.