Fix for issue #12, detaching only every other child 

due to array/list modification during iteration over the list/array
I would suggest putting this comment on the previous line, by itself, in order to avoid an over-long line of code. There's also a typo ("fro".