fixed selected bug from adding the outer