Fixed script performance