Bugfix: parent selection relied on element index