Added name_changed variable to match scope

Fix #217