Code

fix off-by-one on parent selection