Fixed home button history control by clearing it.
Added code to prevent erasing of the currently selected items.