fix selection of last selected compound