bugfix in location deletion