Fix onSelectionChanged not hiding removeButton

Also changed how the function worked a little