fix bug in process_selections