Fix string replacement in surveys