Fixed syntax error with replacement script
Fixed syntax error with misslabeled function