fixed glitch in name replacement algorithm
added "Edit" entry in context menu of SubstitutionEditor