Fix several issues with selector refreshing in popup