Main script fix.