bug fix in detectign removed attributes