Fix replacing of known labels in commands