fixed replacing things in the script