Close the popup when preferences selected