fixed incorrect parent selection