Prepare script fix