fix automatic scripts