Improve symbol replacing