Fix minor errors, restore selction etc.