fix #298 #NAME# and #NUM# not replaced