add test for ref's parent changing
fix refs to emit change events when parents are modified