Fixed incorrect path substitution when updating tags