changed reference seletion (see #304)